$(function() {
	new Vue({
		el: "#orderWaitListApp",
		data: {
			currentPage: 100,
			formLabelWidth: "120px",
			fullscreenLoading: false,
			dialogFormVisible:false,
			currentPage: 1,
			totalSize:1,
			currentSelectOrder:{},
			totalPrice:0,
			allTableData: [],
		},
		created: function() {
			parent.vueData.$data.hreHtml = "../auditWaitOrderList/index.html";
			parent.vueData.activeIndex = "5";
			parent.vueData.getLeftNav("5")
			parent.vueData.$data.categoryIndex = 4
            this.getOrderList(1);
		},
		methods: {

			getOrderList(page){
				this.fullscreenLoading = true;
				let param = {
					page: page,
				}
				axios({
					url: POSTURL.auditOrderList,
					method: 'post',
					data: param
				}).then(response => {
					this.fullscreenLoading = false;
					if (response.data.code === 100) {
						console.log(response.data.result);
						 this.allTableData = response.data.result;
					} else {
						this.$message.error(response.data.message);
					}
				}).catch(error => {
					this.fullscreenLoading = false;
					console.log(error);
					this.$message.error('服务器出错!');
				})
			},
			auditOrder(orderInfo){
				this.fullscreenLoading = true;
				let param = {
					data: orderInfo.shopOrderNo,
				}
				axios({
					url: POSTURL.auditIntegral,
					method: 'post',
					data: param
				}).then(response => {
					this.fullscreenLoading = false;
					if (response.data.code === 100) {
						this.$message({
							showClose: true,
							message: response.data.message,
							type: 'success'
						});
						this.getOrderList(1);
					} else {
						this.$message.error(response.data.message);
					}
				}).catch(error => {
					this.fullscreenLoading = false;
					console.log(error);
					this.$message.error('服务器出错!');
				})
			}
			
		}

	})
})
